#include <iostream>
#include <string>

// 类模板基础语法
template <class NameType, class AgeType>
class Person
{
public:
    Person(NameType name, AgeType age)
    {
        this->name = name;
        this->age = age;
    }

    void showPerson()
    {
        std::cout << "name:" << this->name << " age:" << this->age << std::endl;
    }

    NameType name;
    AgeType age;
};

void test01()
{
    Person<std::string, int> p1("jack", 18);
    p1.showPerson();
}

int main()
{
    test01();
    return 0;
}